<%@ page import="com.portico.dept.solarch.TestCaseExecutionHistory" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta name="layout" content="thin"/>
    <g:set var="entityName"
           value="${message(code: 'testCaseExecutionHistory.label', default: 'TestCaseExecutionHistory')}"/>
    <title><g:message code="default.create.label" args="[entityName]"/></title>
</head>

<body>
<div class="body">
    <br>
    <g:if test="${flash.message}">
        <div class="message">${flash.message}</div>
    </g:if>
    <g:hasErrors bean="${testCaseExecutionHistoryInstance}">
        <div class="errors">
            <g:renderErrors bean="${testCaseExecutionHistoryInstance}" as="list"/>
        </div>
    </g:hasErrors>
    <div id="result">
        <g:formRemote  name="testCaseExecutionHistory" url="[contrller:'testCaseExecutionHistory', action:'save']" update="result">
            <div class="dialog">
                <table>
                    <tbody>

                    <tr class="prop">
                        <td valign="top" class="name">
                            <label for="tcReportDate"><g:message code="testCaseExecutionHistory.tcReportDate.label"
                                                                 default="Tc Report Date"/></label>
                        </td>
                        <td valign="top"
                            class="value ${hasErrors(bean: testCaseExecutionHistoryInstance, field: 'tcReportDate', 'errors')}">
                            <g:datePicker name="tcReportDate" precision="day"
                                          value="${testCaseExecutionHistoryInstance?.tcReportDate}"/>
                        </td>
                    </tr>

                    <tr class="prop">
                        <td valign="top" class="name">
                            <label for="clientReported"><g:message code="testCaseExecutionHistory.clientReported.label"
                                                                   default="Client Reported"/></label>
                        </td>
                        <td valign="top"
                            class="value ${hasErrors(bean: testCaseExecutionHistoryInstance, field: 'clientReported', 'errors')}">
                            <g:checkBox name="clientReported"
                                        value="${testCaseExecutionHistoryInstance?.clientReported}"/>
                        </td>
                    </tr>

                    <tr class="prop">
                        <td valign="top" class="name">
                            <label for="comments"><g:message code="testCaseExecutionHistory.comments.label"
                                                             default="Comments"/></label>
                        </td>
                        <td valign="top"
                            class="value ${hasErrors(bean: testCaseExecutionHistoryInstance, field: 'comments', 'errors')}">
                            <g:textField name="comments" value="${testCaseExecutionHistoryInstance?.comments}"/>
                        </td>
                    </tr>

                    <tr class="prop">
                        <td valign="top" class="name">
                            <label for="project"><g:message code="testCaseExecutionHistory.project.label"
                                                            default="Project"/></label>
                        </td>
                        <td valign="top"
                            class="value ${hasErrors(bean: testCaseExecutionHistoryInstance, field: 'project', 'errors')}">
                            <g:select name="project.id" from="${com.portico.dept.solarch.Project.list()}" optionKey="id"
                                      value="${testCaseExecutionHistoryInstance?.project?.id}"/>
                        </td>
                    </tr>

                    <tr class="prop">
                        <td valign="top" class="name">
                            <label for="tcCreated"><g:message code="testCaseExecutionHistory.tcCreated.label"
                                                              default="Tc Created"/></label>
                        </td>
                        <td valign="top"
                            class="value ${hasErrors(bean: testCaseExecutionHistoryInstance, field: 'tcCreated', 'errors')}">
                            <g:textField name="tcCreated"
                                         value="${fieldValue(bean: testCaseExecutionHistoryInstance, field: 'tcCreated')}"/>
                        </td>
                    </tr>

                    <tr class="prop">
                        <td valign="top" class="name">
                            <label for="tcExecuted"><g:message code="testCaseExecutionHistory.tcExecuted.label"
                                                               default="Tc Executed"/></label>
                        </td>
                        <td valign="top"
                            class="value ${hasErrors(bean: testCaseExecutionHistoryInstance, field: 'tcExecuted', 'errors')}">
                            <g:textField name="tcExecuted"
                                         value="${fieldValue(bean: testCaseExecutionHistoryInstance, field: 'tcExecuted')}"/>
                        </td>
                    </tr>

                    <tr class="prop">
                        <td valign="top" class="name">
                            <label for="tcPassed"><g:message code="testCaseExecutionHistory.tcPassed.label"
                                                             default="Tc Passed"/></label>
                        </td>
                        <td valign="top"
                            class="value ${hasErrors(bean: testCaseExecutionHistoryInstance, field: 'tcPassed', 'errors')}">
                            <g:textField name="tcPassed"
                                         value="${fieldValue(bean: testCaseExecutionHistoryInstance, field: 'tcPassed')}"/>
                        </td>
                    </tr>

                    </tbody>
                </table>
            </div>

            <div class="buttons">
                <span class="button"><g:submitButton name="create" class="save"
                                                     value="${message(code: 'default.button.create.label', default: 'Create')}"/></span>
            </div>
        </g:formRemote></div>
</div>
</body>
</html>
